<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019-08-26
 * Time: 14:15 // 微信小程序接口类
 * url链接 https://www.cnblogs.com/hui9527/p/8513336.html
 */
namespace App\Http\Common;

/**
 * 公众号的
 * Class WeChat
 * @package App\Http\Common
 */
class WeChat {
    //参数
    public $config;
    //防止直接创建对象
    public function __construct(){
        $config = [
            // 必要配置
            'app_id'             => env('WECHAT_APPID'),
            'secret'             => env('WECHAT_APPSECRET'),
            'mch_id'             => env('WECHAT_PAYMENT_MCH_ID'),
            'key'                => env('WECHAT_PAYMENT_KEY'),   // API 密钥
            'notify_url'         => env('SERVER_API_ADDRESS').'/frontCity/tools/weChat/contractNotify1',// 你也可以在下单时单独设置来想覆盖它
        ];
        $this->config = $config;
    }
}
